/*
 * Copyright (C) 2016 Facishare Technology Co., Ltd. All Rights Reserved.
 */
package com.wlh.animation.ipctest;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author weilh
 *         <b>DATE</b> 2016/8/23.
 */
public class Book implements Parcelable{
    public String id;
    public String name;

    protected Book() {

    }
    protected Book(Parcel in) {
       readFromParcel(in);
    }

    public void readFromParcel(Parcel in ){

        id = in.readString();
        name = in.readString();
    }
    public static final Creator<Book> CREATOR = new Creator<Book>() {
        @Override
        public Book createFromParcel(Parcel in) {
            return new Book(in);
        }

        @Override
        public Book[] newArray(int size) {
            return new Book[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(name);
    }

}
